package com.example.beandefinition.controller;

import com.example.beandefinition.config.BeanScannerConfigurer;
import com.example.beandefinition.config.SystemConfig;
import com.example.beandefinition.config.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {
    @Autowired
    private BeanScannerConfigurer configurer;

    @Autowired
    private SystemConfig systemConfig;

    @Autowired
    private UserService userService;

    @GetMapping("/index")
    public String getConfig() {
        System.out.println(systemConfig.getSystemName());
        return configurer.getBasePackage();
    }
}
